package config

var DefaultStorageConfig = &StorageConfig{}

type StorageConfig struct {
	Domain string       `mapstructure:"domain"`
	Local  LocalStorage `mapstructure:"local"`
	Qiniu  QiniuStorage `mapstructure:"qiniu"`
	Cos    CosStorage   `mapstructure:"cos"`
	Oss    OssStorage   `mapstructure:"oss"`
	Obs    ObsStorage   `mapstructure:"obs"`
}

type LocalStorage struct {
	Path string `mapstructure:"path"`
}

type QiniuStorage struct {
	Bucket    string `mapstructure:"bucket"`
	AccessKey string `mapstructure:"accessKey"`
	SecretKey string `mapstructure:"secretKey"`
}

type CosStorage struct {
	SecretId  string `mapstructure:"secretId"`
	SecretKey string `mapstructure:"secretKey"`
	Region    string `mapstructure:"region"`
	Bucket    string `mapstructure:"bucket"`
}

type OssStorage struct {
	AccessId     string `mapstructure:"accessId"`
	AccessSecret string `mapstructure:"accessSecret"`
	Endpoint     string `mapstructure:"endpoint"`
	Bucket       string `mapstructure:"bucket"`
}

type ObsStorage struct {
	Ak       string `mapstructure:"ak"`
	Sk       string `mapstructure:"sk"`
	Endpoint string `mapstructure:"endpoint"`
	Bucket   string `mapstructure:"bucket"`
}
